<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/include/page.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<title>个人中心 - 用户中心</title>
<%@ include file="/common/include/title.jsp"%>
<%-- 表单验证 --%>
<link rel="stylesheet" href="${rootpath }/common/resource/bootstrapvalidator/css/bootstrapValidator.css"/>
<script type="text/javascript" src="${rootpath }/common/resource/bootstrapvalidator/js/bootstrapValidator.js"></script>
   
<script type="text/javascript">
	$(function (){
	    $('#form').bootstrapValidator({
	    	container: 'tooltip',
	        feedbackIcons: {
	            valid: 'glyphicon glyphicon-ok',
	            invalid: 'glyphicon glyphicon-remove',
	            validating: 'glyphicon glyphicon-refresh'
	        },
	        fields: {
	        	password: {
	                validators: {
	                	notEmpty:
                    	{
                			message: '密码不能为空'
                    	},
                        stringLength: {
                        	min: 6,
                            max: 50,
                            message: '密码长度必须在6到18位之间'
                        }
	                }
	            },
	        	confirmPassword: {
	                validators: {
	                	notEmpty:
                    	{
                			message: '确认密码不能为空'
                    	},
                        stringLength: {
                        	min: 6,
                            max: 50,
                            message: '确认密码长度必须在6到50位之间'
                        },
                        identical: {
                            field: 'password',
                            message: '两次密码不一样'
                        }
	                }
	            },
	        }
	    });
	});
</script>

</head>
<body>
	<%@ include file="/common/include/header.jsp"%>
	<div class="container-fluid">
		<div class="row">
			<div class="col-sm-8 col-sm-offset-1 main">
				<h2 class="sub-header">修改个人信息</h2>
				<form id="form" class="form-horizontal" action="${rootpath }/head/users/usersUpdateSubmit.html">
					<input type="hidden" name="operType" value="${param.operType }">
					<div class="form-group">
						<label for="email" class="col-sm-2 control-label">邮箱:</label>
						<div class="col-sm-8">
							${requestScope.users.email }
						</div>
					</div>
					<div class="form-group">
						<label for="souPass" class="col-sm-2 control-label">原密码:</label>
						<div class="col-sm-8">
							<input type="password" name="souPass" id="souPass" class="form-control" placeholder="原密码"/>
						</div>
					</div>
					<div class="form-group">
						<label for="password" class="col-sm-2 control-label">密码:</label>
						<div class="col-sm-8">
							<input type="password" name="password" id="password" class="form-control" placeholder="密码"/>
						</div>
					</div>
					<div class="form-group">
						<label for="confirmPassword" class="col-sm-2 control-label">确认密码:</label>
						<div class="col-sm-8">
							<input type="password" name="confirmPassword" id="confirmPassword" class="form-control" placeholder="确认密码"/>
						</div>
					</div>
					<div class="form-group">
						<div class="col-sm-8 col-sm-offset-2">
							<button class="btn btn-lg btn-primary" type="submit">提交</button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
	<%@ include file="/common/include/footer.jsp"%>
</body>
</html>